<?php
	header("Content-type:text/html;charset=utf-8");
	$name=$_POST["userName"];
	$pwd=$_POST["userPwd"];
	$conn=mysql_connect("localhost","root","root");
	// if($conn){
	//  echo "连接成功!";
	mysql_select_db("anta");
	$result = mysql_query("insert into userinfo(id,pwd) values('$name','$pwd')",$conn);
		$row = mysql_num_rows($result);
		if($row==1){
			echo "success";
		}else{
			echo "fail";
		}
		mysql_close($conn);
	// }
?>